#pragma once

#define REAL double

void gpu_relax_p(REAL **pmatf, REAL **fmatf, int nxf, int nyf);

void augmen_p(REAL** ap, REAL** p, int nxt, int nyt);

void cpu_relax_p(REAL** p, REAL** f, int nxt, int nyt);

int main(int argc, char** argv);

void initial(REAL **pmat, REAL **fmat, int nxl, int nxr, int nyl, int nyr, REAL xright, REAL yright, REAL **bdpo, int nt, REAL radi);

void div_uv(REAL **tu, REAL **tv, REAL **divuv, int nxt, int nyt);

void ibm_force(REAL** bd_posi, REAL* ds, REAL **fxx, REAL **fyy, REAL h, REAL kappa, int nx, int ny, int nt);

void pressure_update(REAL **a, int nx, int ny);

void vcycle_uv(REAL **uf, REAL **ff, int nxf, int nyf, int nx, int ilevel);

void MG_Poisson(REAL **p, REAL **f, int nx, int ny);     // 多重网格方法求解压力泊松方程

void restrict1(REAL **u_fine, REAL **u_coarse, int nxt, int nyt);

void prolong(REAL **u_coarse, REAL **u_fine, int nxt, int nyt);

void residual_p(REAL **r, REAL **u, REAL **f, int nxt, int nyt);

void laplace_p(REAL **p, REAL **lap_p, int nxt, int nyt);

void grad_p(REAL **p, REAL **dpdx, REAL **dpdy, int nxt, int nyt);

void augmen_p(REAL** ap, REAL** p, int nxt, int nyt);

REAL delta(REAL x);





